package top.catchcat.blogs.service;

import com.github.pagehelper.PageInfo;
import top.catchcat.blogs.dao.blogs.Blog;

public interface BlogService {
    boolean insertOrUpdateBlog(Blog blog);
    boolean deleteBlog(Long id);
    Blog getBlogById(Long id, boolean isOpened);

    PageInfo<Blog> getAllBlogs(String search, String tag, String sort, Integer pageNum, Integer pageSize);
    PageInfo<Blog> getAllBlogsByUserId(Integer pageNum, Integer pageSize,Long userId);
}
